const child = require('child_process');

const TAR_LIB_NAME = 'echatim-lastest.tar.gz';
const TARGET_LIB_EXTRACT = 'src/libs/sdk';

// 把 TAR_LIB_NAME 解压到 TARGET_LIB_EXTRACT 目录
// child.exec('cp -rf src/echatim dist && cd dist && tar -cvzf echatim-lastest.tar.gz echatim && rm -fr echatim', function(err, sto) {
child.exec(`cp ${TAR_LIB_NAME} ${TARGET_LIB_EXTRACT} && cd ${TARGET_LIB_EXTRACT} && tar -xvf ${TAR_LIB_NAME} && rm -f ${TAR_LIB_NAME}`, function(err, sto) {
    console.log(sto);
});


